<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::miss('Error/http404');

// 图片上传
Route::post('Upload/uploadImg$', 'Upload/uploadImg');

// 独立域名审核通过及部署
Route::post('DomainAudit/approve$', 'DomainAudit/approve');
Route::post('DomainAudit/replace_ssl$', 'DomainAudit/replace_ssl'); // 更换安全证书

// 登录
Route::any('Login/index$', 'Login/index');
Route::get('Login/captcha', 'Login/captcha');
Route::post('Login/send_verify_code', 'Login/send_verify_code');
Route::post('Login/sms_login', 'Login/sms_login');
Route::post('Login/login_out', 'Login/login_out');
Route::get('Login/agreement', 'Login/agreement');

// 搜索
Route::get('Search/index$', 'Search/index');
Route::any('Search/result$', 'Search/result');

// 首页
Route::get('/', 'Index/index');
Route::get('Index$', 'Index/index');

// 课程
Route::any('Course/index$', 'Course/index');
Route::post('Course/get_second_category', 'Course/get_second_category');
Route::get('Course/detail$', 'Course/detail');
Route::get('Course/study$', 'Course/study');
Route::post('Course/study_verify_auth$', 'Course/study_verify_auth');

// 题库
Route::any('Question/index$', 'Question/index');
Route::get('Question/chapter_detail$', 'Question/chapter_detail');
Route::get('Question/detail$', 'Question/detail');
Route::post('Question/get_question_names$', 'Question/get_question_names'); // 获取相同分类题库
Route::post('Question/get_chapters$', 'Question/get_chapters'); // 获取题库章节
Route::post('Question/reset_chapter_process$', 'Question/reset_chapter_process'); // 章节练习重置
Route::any('Question/practice_set$', 'Question/practice_set'); // 刷题设置
Route::any('Question/chapter_practice$', 'Question/chapter_practice'); // 章节练习
Route::post('Question/get_question_info$', 'Question/get_question_info'); // 获取题目详情
Route::post('Question/favorites_add$', 'Question/favorites_add'); // 题目收藏、取消
Route::any('Question/correction$', 'Question/correction'); // 题目纠错
Route::post('Question/get_note$', 'Question/get_note'); // 获取笔记
Route::any('Question/note$', 'Question/note'); // 写笔记
Route::post('Question/note_like$', 'Question/note_like'); // 笔记点赞
Route::post('Question/submit_answer$', 'Question/submit_answer'); // 提交答案
Route::get('Question/practice_report$', 'Question/practice_report'); // 练习报告

// 商品
Route::any('Goods/index$', 'Goods/index');
Route::get('Goods/detail$', 'Goods/detail');
Route::post('Goods/get_attr_info$', 'Goods/get_attr_info');

// 直播
Route::any('Live/index$', 'Live/index');
Route::get('Live/detail$', 'Live/detail');

// 考试
Route::any('Exam/index$', 'Exam/index');
Route::get('Exam/detail$', 'Exam/detail');
Route::post('Exam/get_exam_log$', 'Exam/get_exam_log'); // 考试记录
Route::post('Exam/verify_is_practice$', 'Exam/verify_is_practice'); // 验证是否满足可考试条件
Route::any('Exam/practice_detail$', 'Exam/practice_detail'); // 练题详情
Route::get('Exam/practice$', 'Exam/practice'); // 考试练题
Route::get('Exam/practice_rank$', 'Exam/practice_rank'); // 练题排行
Route::post('Exam/practice_submit$', 'Exam/practice_submit'); // 提交考试

// 资讯
Route::any('Article/index$', 'Article/index');
Route::get('Article/detail$', 'Article/detail');

// 订单
Route::post('Order/get_free_power$', 'Order/get_free_power'); // 免费领取课程
Route::get('Order/prepare$', 'Order/prepare');
Route::post('Order/get_calc_price$', 'Order/get_calc_price'); // 计算价格
Route::post('Order/create$', 'Order/create'); // 创建订单
Route::any('Order/continue_pay$', 'Order/continue_pay'); // 订单继续支付
Route::post('Order/check_order_pay$', 'Order/check_order_pay'); // 检查订单支付

// +----------------------------------------------------------------------
// | 个人中心相关
// +----------------------------------------------------------------------

Route::any('User/info$', 'User/info'); // 个人资料
Route::get('User/update_nickname$', 'User/update_nickname');
Route::any('User/update_realname$', 'User/update_realname');
Route::any('User/update_pass$', 'User/update_pass');
Route::post('User/like$', 'User/like'); // 点赞
Route::post('User/unlike$', 'User/unlike'); // 取消点赞

Route::any('User/feedback$', 'User/feedback'); // 意见反馈

// 收货地址
Route::any('User/address$', 'User/address');
Route::any('User/address_edit$', 'User/address_edit');
Route::delete('User/address_delete$', 'User/address_delete');

// 我的优惠券
Route::any('User/coupon$', 'User/coupon');

// 我的收益
Route::any('User/income$', 'User/income');

// 我的推广
Route::any('User/promotion$', 'User/promotion');
Route::any('User/promotion_share$', 'User/promotion_share');

// 我的余额
Route::any('User/balance$', 'User/balance');

// 我的收藏
Route::any('User/favorites$', 'User/favorites');
Route::post('User/favorites_product$', 'User/favorites_product');
Route::post('User/favorites_del$', 'User/favorites_del');

// 我的订单
Route::any('User/order$', 'User/order');
Route::get('User/order_detail$', 'User/order_detail');
Route::any('User/cancel_order$', 'User/cancel_order');

// 我的课程
Route::any('User/course$', 'User/course');

// 我的题库
Route::any('User/question_bank$', 'User/question_bank');

// 我的考试
Route::any('User/exam$', 'User/exam');
Route::get('User/exam_log$', 'User/exam_log');

// 我的直播课
Route::any('User/live$', 'User/live');

// 我的兑换
Route::any('User/exchange$', 'User/exchange');
Route::post('User/exchange_log$', 'User/exchange_log');
